#pragma once
#include "stdafx.h"

template<class T1>
inline boost::any AuxGroupArgus( T1 _1 )
{
	std::vector< boost::any > result;

	result.push_back( boost::any(_1));
	return result;
}

template<class T1, class T2>
inline boost::any AuxGroupArgus( T1 _1, T2 _2 )
{
	std::vector< boost::any > result;

	result.push_back( boost::any(_1));
	result.push_back( boost::any(_2));

	return result;
}

template<class T1, class T2, class T3>
inline boost::any AuxGroupArgus( T1 _1, T2 _2, T3 _3 )
{
	std::vector< boost::any > result;

	result.push_back( boost::any(_1));
	result.push_back( boost::any(_2));
	result.push_back( boost::any(_3));

	return result;
}

template<class T1, class T2, class T3, class T4>
inline boost::any AuxGroupArgus( T1 _1, T2 _2, T3 _3, T4 _4 )
{
	std::vector< boost::any > result;

	result.push_back( boost::any(_1));
	result.push_back( boost::any(_2));
	result.push_back( boost::any(_3));
	result.push_back( boost::any(_4));

	return result;
}

template<class T1, class T2, class T3, class T4, class T5>
inline boost::any AuxGroupArgus( T1 _1, T2 _2, T3 _3, T4 _4, T5 _5 )
{
	std::vector< boost::any > result;

	result.push_back( boost::any(_1));
	result.push_back( boost::any(_2));
	result.push_back( boost::any(_3));
	result.push_back( boost::any(_4));
	result.push_back( boost::any(_5));

	return result;
}

template<class T1, class T2, class T3, class T4, class T5, class T6>
inline boost::any AuxGroupArgus( T1 _1, T2 _2, T3 _3, T4 _4, T5 _5, T6 _6 )
{
	std::vector< boost::any > result;

	result.push_back( boost::any(_1));
	result.push_back( boost::any(_2));
	result.push_back( boost::any(_3));
	result.push_back( boost::any(_4));
	result.push_back( boost::any(_5));
	result.push_back( boost::any(_6));

	return result;
}

template<class T1>
inline void AuxUnGroupArgus( boost::any p, T1& _1 )
{

	std::vector<boost::any> tmp =  boost::any_cast< std::vector<boost::any> >(p);
	std::vector<boost::any>::iterator iter=tmp.begin();
	_1=boost::any_cast<T1>(*iter++);

}


template<class T1, class T2>
inline void AuxUnGroupArgus( boost::any p, T1& _1, T2& _2 )
{

	std::vector<boost::any> tmp =  boost::any_cast< std::vector<boost::any> >(p);
	std::vector<boost::any>::iterator iter=tmp.begin();
	_1=boost::any_cast<T1>(*iter++);
	_2=boost::any_cast<T2>(*iter++);

}

template<class T1, class T2, class T3>
inline void AuxUnGroupArgus( boost::any p, T1& _1, T2& _2, T3& _3 )
{

	std::vector<boost::any> tmp =  boost::any_cast< std::vector<boost::any> >(p);
	std::vector<boost::any>::iterator iter=tmp.begin();
	_1=boost::any_cast<T1>(*iter++);
	_2=boost::any_cast<T2>(*iter++);
	_3=boost::any_cast<T3>(*iter++);

}

template<class T1, class T2, class T3, class T4>
inline void AuxUnGroupArgus( boost::any p, T1& _1, T2& _2, T3& _3, T4& _4 )
{

	std::vector<boost::any> tmp =  boost::any_cast< std::vector<boost::any> >(p);
	std::vector<boost::any>::iterator iter=tmp.begin();
	_1=boost::any_cast<T1>(*iter++);
	_2=boost::any_cast<T2>(*iter++);
	_3=boost::any_cast<T3>(*iter++);
	_4=boost::any_cast<T4>(*iter++);


}

template<class T1, class T2, class T3, class T4, class T5>
inline void AuxUnGroupArgus( boost::any p, T1& _1, T2& _2, T3& _3, T4& _4, T5& _5 )
{

	std::vector<boost::any> tmp =  boost::any_cast< std::vector<boost::any> >(p);
	std::vector<boost::any>::iterator iter=tmp.begin();
	_1=boost::any_cast<T1>(*iter++);
	_2=boost::any_cast<T2>(*iter++);
	_3=boost::any_cast<T3>(*iter++);
	_4=boost::any_cast<T4>(*iter++);
	_5=boost::any_cast<T5>(*iter++);

}

template<class T1, class T2, class T3, class T4, class T5, class T6>
inline void AuxUnGroupArgus( boost::any p, T1& _1, T2& _2, T3& _3, T4& _4, T5& _5, T6& _6 )
{

	std::vector<boost::any> tmp =  boost::any_cast< std::vector<boost::any> >(p);
	std::vector<boost::any>::iterator iter=tmp.begin();
	_1=boost::any_cast<T1>(*iter++);
	_2=boost::any_cast<T2>(*iter++);
	_3=boost::any_cast<T3>(*iter++);
	_4=boost::any_cast<T4>(*iter++);
	_5=boost::any_cast<T5>(*iter++);
	_6=boost::any_cast<T6>(*iter++);

}